package com.example.auth.service.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.auth.mapper.SysUserMapper;
import com.example.auth.model.domain.SysUser;
import com.example.auth.service.ISysUserService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;

import java.util.Date;

/**
 * <p>
 * 系统用户表 服务实现类
 * </p>
 *
 * @author xijie.wang
 * @since 2022-04-11
 */
@Service
public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> implements ISysUserService {


	@Override
	public SysUser getUserByPhone(String phone) {
		if(StringUtils.isBlank(phone)){
			return null;
		}
		return baseMapper.getUserByPhone(phone);
	}

	@Override
	public void updateLastLoginTimeById(Integer id, Date date) {
		baseMapper.updateLastLoginTimeById(id,date);
	}
}
